/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EspecialiadMasCalificada.java
 *
 * Created on 21/11/2011, 03:30:37 AM
 */
package Interface;

import javax.swing.JTable;

/**
 *
 * @author Agustin
 */
public class EspecialiadMasCalificada extends javax.swing.JFrame {

    private static EspecialiadMasCalificada instance;

    public static EspecialiadMasCalificada getInstance() {
        if (instance == null) {
            instance = new EspecialiadMasCalificada();
        }
        instance.cargartablas();
        return instance;
    }

    public void cargartablas() {
        ModeloTablaEspecialidad modelo = new ModeloTablaEspecialidad();
        JTable miTabla = new JTable(modelo.getEspecialidades(), modelo.getCabeceras());
        tblEspecialidadMasCalificada.setModel(miTabla.getModel());
    }

    /** Creates new form EspecialiadMasCalificada */
    public EspecialiadMasCalificada() {
        initComponents();
        this.setLocationRelativeTo(null);
        cargartablas();

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblEspecialidadMasCalificada = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEspecialidadMasCalificada = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        lblEspecialidadMasCalificada.setFont(new java.awt.Font("Monospaced", 0, 24));
        lblEspecialidadMasCalificada.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblEspecialidadMasCalificada.setText("Especialidad Mas Calificada");

        tblEspecialidadMasCalificada.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane1.setViewportView(tblEspecialidadMasCalificada);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEspecialidadMasCalificada, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblEspecialidadMasCalificada, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new EspecialiadMasCalificada().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblEspecialidadMasCalificada;
    private javax.swing.JTable tblEspecialidadMasCalificada;
    // End of variables declaration//GEN-END:variables
}
